//
//  QWBaseConfig.h
//  Pods
//
//  Created by ranjingfu on 16/1/13.
//
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AssetsLibrary/AssetsLibrary.h>

#ifndef RGB
#define RGB(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]
#define RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#endif

#ifndef SCREEN_WIDTH
#define SCREEN_WIDTH   ([UIScreen mainScreen].bounds.size.width)
#endif

#ifdef SCREEN_HEIGHT
#define SCREEN_HEIGHT  ([UIScreen mainScreen].bounds.size.height)
#endif

#ifndef SCREEN_SCALE
#define SCREEN_SCALE   ([UIScreen mainScreen].scale)
#endif

#ifndef CUSTOM_FONT_LIGHT//(sizeX)
#define CUSTOM_FONT_LIGHT(sizeX)        [UIFont fontWithName:@"NotoSansHans-DemiLight" size:sizeX]
#endif

#ifndef CUSTOM_FONT_BOLD//(sizeX)
#define CUSTOM_FONT_BOLD(sizeX)         [UIFont fontWithName:@"NotoSansHans-Medium" size:sizeX]
#endif

#ifndef BUTTON_TEXT_COLOR_DARK
#define BUTTON_TEXT_COLOR_DARK          RGB(100, 100, 100)
#endif


#ifndef LABEL_TEXT_COLOR_GRAY
#define LABEL_TEXT_COLOR_GRAY           RGB(170, 170, 170)
#endif

#ifndef QW_IMAGE_PICKER_LOCATION_INTERVAL
#define QW_IMAGE_PICKER_LOCATION_INTERVAL       (1*60)
#endif

#ifndef NOTIFICATION_ENUM_GROUP_FINISHED
#define NOTIFICATION_ENUM_GROUP_FINISHED              @"enumAllPhotoGroupNotification"
#endif

#ifndef APP_ALBUM_NAME
#define APP_ALBUM_NAME @"淘在路上社区"
#endif

#ifndef UPLOAD_DIR
#define UPLOAD_DIR                       @"uploadImages"
#endif

#ifndef CACHES_DIR
#define CACHES_DIR                       @"/Documents/"
#endif

// 蓝色占位图的背景颜色
#ifndef PLACEHODER_BLUE_COLOR
#define PLACEHODER_BLUE_COLOR           RGB(216, 236, 247)
#endif

#ifndef D_PIXELS
#define D_PIXELS                (UIScreen.mainScreen.bounds.size.width * UIScreen.mainScreen.scale)
#endif

#ifndef MAX_LOC_COUNT
#define MAX_LOC_COUNT   2
#endif

#ifndef MAX_LOC_TIME
#define MAX_LOC_TIME    10
#endif

#ifndef QWImagePickerLocalizedString
#define QWImagePickerLocalizedString(key,c) NSLocalizedStringFromTableInBundle(key, @"photo",[QWImageMangerConfig baseBundle],c)
#endif

#ifndef VIDEO_BIT_RATE_HIGH
#define VIDEO_BIT_RATE_HIGH  3768000
#endif

#ifndef VIDEO_BIT_RATE_LOW
#define VIDEO_BIT_RATE_LOW   1520000
#endif

@interface QWImageMangerConfig : NSObject

@property(nonatomic, strong)UIColor  *mainFontBlueColor;
@property(nonatomic, strong)UIFont   *customBoldFont;
@property(nonatomic, strong)UIColor  *buttonColor;

@property(nonatomic, assign)NSInteger highVideoBitRate;
@property(nonatomic, assign)NSInteger normalVideoBitRate;
@property(nonatomic, assign)NSInteger audioBitRate;

+ (instancetype)shareInsatnce;
+ (ALAssetsLibrary *)sharedAssetsLibrary;
+ (UIImage*) getStrenchImageHasCache:(NSString*)imageName;
+ (NSString *) createAFolderOnDisk:(NSString *)folderName;
+ (NSString *) convertDateToAlbumDateString:(NSDate *)date;
+ (BOOL)alert:(NSString*)msg;
+ (NSString *)generateGuid;
+ (void)requestErorrMBProgressHUDDisplay:(UIView*)parentView msg:(NSString*) msg;
+ (void)requestSuccessMBProgressHUDDisplay:(UIView*)parentView msg:(NSString*) msg;
+ (NSInteger)getLastFlashMode;
+ (void)setLastFlashMode:(NSInteger)flashMode;
+ (UIImage*)imageNamed:(NSString*)imageName;
+ (NSBundle*)baseBundle;
@end
